home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
prolog
/
ai.prl
/
dprolog.lha
/
election.pro
< prev
next >
Wrap
Text File
|
1991-03-05
|
1KB
|
56 lines
nominate(republicans,bush):=true.
nominate(republicans,dole):=
neg nominate(republicans,bush).
nominate(republicans,kemp):=
neg nominate(republicans,bush),
neg nominate(republicans,dole).
neg nominate(republicans,bush):=
neg supports(reagan,bush).
nominate(democrats,mondale):=
neg runs(kennedy),
neg nominate(republicans,bush).
nominate(democrats,kennedy):=
runs(kennedy),
supports(carter,mondale).
nominate(democrats,hart):=
neg nominate(democrats,kennedy),
neg nominate(democrats,mondale).
elected(Candidate1):=
nominate(republicans,Candidate1),
nominate(democrats,Candidate2),
supports(carter,Candidate2).
elected(kennedy):=
nominate(democrats,kennedy),
nominate(republicans,Candidate),
neg supports(reagan,Candidate).
supports(reagan,kemp).
supports(carter,mondale).
neg supports(Politician,Candidate2):-
supports(Politician,Candidate1),
Candidate2\=Candidate1.
runs(bush).
runs(dole).
runs(kemp).
runs(mondale).
runs(hart).
neg runs(kennedy):=true.